--------------------------------------------------------------------------

This folder contains data and Matlab code to replicate the Monte Carlo and empirical exercise in 

"Survey density forecast comparison in small samples" 
by Laura Coroneo, Fabrizio Iacone and Fabio Profumo, 
International Journal of Forecasting, 2024

--------------------------------------------------------------------------

The codes have been written in Matlab R2023b Update 3 and require the following toolboxes

•   Econometrics Toolbox

•   Signal Processing Toolbox

•   Statistics and Machine Learning Toolbox

--------------------------------------------------------------------------

MONTE CARLO


•   MC_size.m: reproduces Tables 1 and 2. These tables contain the empirical size of the EPA and FE tests.

•   MC_Figure1.m: reproduces Figure 1. This figure reports the finite sample power of the EPA test.

--------------------------------------------------------------------------

EMPIRICAL


•   Figure2.m: reproduces Figure 2.  The figure plots the histogram of the aggregate HICP one-year ahead forecast from the 2016.Q1 survey round.

•   Main.m: reproduces Tables 3-18. Tables 3-5 report the forecast evaluation test statistics for the full sample and the two subsamples using the RPS loss function. Table 6 reports the average RPS scores. Tables 7-9 report the summary statistics of the loss differential of the three variables. Table 10 reports the forecast combination weights for the FE test. Tables 11-18 report the results for the QPS loss function.

--------------------------------------------------------------------------

DATA:

•   SPFGDP.xlsx: ECB density survey forecast for Real GDP Growth. The sheet 12M contains the 1-year ahead forecasts, the sheet 24M contains the 2-year ahead forecasts, the sheet edges contains bin edges for each survey round, the sheets B12M and and B24M contain the naive benchmark forecast one and two years ahead, respectively. Yellow rows are those where the previous year forecast was adjusted for the new bin structure of the survey round.

•   SPFHICP.xlsx: ECB density survey forecast for Harmonised Index of Consumer Prices (HICP). The sheet 12M contains the 1-year ahead forecasts, the sheet 24M contains the 2-year ahead forecasts, the sheet edges contains bin edges for each survey round, the sheets B12M and and B24M contain the naive benchmark forecast one and two years ahead, respectively. Yellow rows are those where the previous year forecast was adjusted for the new bin structure of the survey round.

•   SPFUN.xlsx: ECB density survey forecast for the unemployment rate. The sheet 12M contains the 1-year ahead forecasts, the sheet 24M contains the 2-year ahead forecasts, the sheet edges contains bin edges for each survey round, the sheets B12M and and B24M contain the naive benchmark forecast one and two years ahead, respectively. Yellow rows are those where the previous year forecast was adjusted for the new bin structure of the survey round.

•   realised.xlsx: Contains realised data for real GDP growth, HICP inflation and the unemployemnt rate. Data can be downloaded from the Euro-Area Real-time database. GDP is the year-on-year growth of series RTD.Q.S0.S.G_GDPM_TO_C.E. HICP is RTD.M.S0.N.P_C_OV.A and UN is RTD.M.S0.S.L_UNETO.F.

--------------------------------------------------------------------------

AUXILIARY FUNCTIONS:

•   benchmarks.m:  Computes benchmark forecasts for each survey deadline

•   dm.m: Performs the one-sided DM test at the 5% level

•   load_data.m: Loads realised data and SPF forecast data

•   loss.m: Calculates Ranked Probability Score (RPS) loss or Quadratic Probability Score (QPS) loss

•   NeweyWest.m: Returns the Newey-West estimator of the long run variance matrix

•   printmat_LC.m: Prints a matrix with labels
